<template>
  <el-row :gutter="10" class="panel-group">
    <!-- <el-col :span="6">
      <div class="card-panel">
        <div class="card-panel-icon-wrapper icon-people">
          <img src="@/assets/images/home/sold.png" alt="" />
        </div>
        <div class="card-panel-description">
          <count-to
            :start-val="0"
            :end-val="102400"
            :duration="2600"
            class="card-panel-num"
          />
          <div class="card-panel-text">总销售额</div>
        </div>
      </div>
    </el-col>
    <el-col :span="6">
      <div class="card-panel">
        <div class="card-panel-icon-wrapper icon-message">
          <img src="@/assets/images/home/ask.png" alt="" />
        </div>撒
        <div class="card-panel-description">
          <count-to
            :start-val="0"
            :end-val="81212"
            :duration="3000"
            class="card-panel-num"
          />
          <div class="card-panel-text">访问量</div>
        </div>
      </div>
    </el-col>
    <el-col :span="6">
      <div class="card-panel">
        <div class="card-panel-icon-wrapper icon-money">
          <img src="@/assets/images/home/pay.png" alt="" />
        </div>
        <div class="card-panel-description">
          <count-to
            :start-val="0"
            :end-val="9280"
            :duration="3200"
            class="card-panel-num"
          />
          <div class="card-panel-text">支付笔数</div>
        </div>
      </div>
    </el-col>
    <el-col :span="6">
      <div class="card-panel">
        <div class="card-panel-icon-wrapper icon-shopping">
          <img src="@/assets/images/home/return.png" alt="" />
        </div>
        <div class="card-panel-description">
          <count-to
            :start-val="0"
            :end-val="13600"
            :duration="3600"
            class="card-panel-num"
          />
          <div class="card-panel-text">线上购物转化率</div>
        </div>
      </div>
    </el-col> -->

    <el-col :span="6">
      <div class="card-panel margin">
        <div class="card-panel-icon-wrapper icon-shopping">
          <img src="@/assets/images/home/Group3.png" alt="" />
        </div>
        <div class="card-panel-description">
          <count-to
            :start-val="0"
            :end-val="this.list.trainingRecords"
            :duration="3600"
            class="card-panel-num"
          />
          <div class="card-panel-text">培训记录</div>
        </div>
      </div>
    </el-col>

    <el-col :span="6">
      <div class="card-panel margin">
        <div class="card-panel-icon-wrapper icon-shopping">
          <img
            style="width: 27px; height: 27px"
            src="@/assets/images/home/icon2.png"
            alt=""
          />
        </div>
        <div class="card-panel-description">
          <count-to
            :start-val="0"
            :end-val="this.list.securityCheck"
            :duration="3600"
            class="card-panel-num"
          />
          <div class="card-panel-text">安全检查表</div>
        </div>
      </div>
    </el-col>

    <el-col :span="6">
      <div class="card-panel margin">
        <div class="card-panel-icon-wrapper icon-shopping">
          <img
            style="width: 27px; height: 27px"
            src="@/assets/images/home/icon3.png"
            alt=""
          />
        </div>
        <div class="card-panel-description">
          <count-to
            :start-val="0"
            :end-val="this.list.safetyWarningSigns"
            :duration="3600"
            class="card-panel-num"
          />
          <div class="card-panel-text">安全警示牌管理</div>
        </div>
      </div>
    </el-col>
    <el-col :span="6">
      <div class="card-panel margin">
        <div class="card-panel-icon-wrapper icon-shopping">
          <img
            style="width: 27px; height: 27px"
            src="@/assets/images/home/anouance.png"
            alt=""
          />
        </div>
        <div class="card-panel-description">
          <count-to
            :start-val="0"
            :end-val="this.list.safetyMeeting"
            :duration="3600"
            class="card-panel-num"
          />
          <div class="card-panel-text">安全列会</div>
        </div>
      </div>
    </el-col>
  </el-row>
</template>

<script>
import CountTo from "vue-count-to";
import request from "@/utils/request";
export default {
  components: { CountTo },
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    // this.initchart();
  },
  methods: {
    initchart() {
      request({
        url: `/api/getway/Xy_hse_yhpctj/findTrainingRecords?organizeId=${this.$store.getters.organizeId}`,
        method: "get",
      }).then((res) => {
        this.list = res.data.list[0];
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.panel-group {
  margin-bottom: 10px;
  .card-panel {
    border-radius: 4px;
    background: #fff;
    display: flex;
    padding: 34px 25px;
    background-image: url("../../../../assets/images/home/bg.png");
    background-size: cover;
    background-position: center;
    .icon-people,
    .icon-message,
    .icon-money,
    .icon-shopping {
      width: 75px;
      height: 75px;
      text-align: center;
      line-height: 89px;
      border-radius: 50%;
      margin-right: 32px;
      flex-shrink: 0;
    }
  }
  .margin {
    // margin-top: 10px;
    cursor: pointer;
  }
  .card-panel-num {
    font-size: 20px;
    font-weight: 600;
  }
  .card-panel-text {
    margin-top: 4px;
    font-size: 14px;
    color: #666;
  }
}
.icon-people {
  background: #f2ebfb;
}

.icon-message {
  background: #edf8fe;
}

.icon-money {
  background: #fef3ef;
}

.icon-shopping {
  background: #ffeff2;
}

.icon-people {
  color: #40c9c6;
}

.icon-message {
  color: #36a3f7;
}

.icon-money {
  color: #f4516c;
}

.icon-shopping {
  color: #34bfa3;
}
.card-panel-description {
  padding-top: 15px;
}
</style>